package com.adminlab.vos
{
	import mx.collections.ArrayCollection;

	[Bindable]
	public class ExamType extends ExamTypeSummary
	{
		public var order:String;
		public var description:String;
		public var title:String;
		public var results: ArrayCollection = new ArrayCollection();
		[Transient]
		public var saved:Boolean = false;
		
		public function ExamType()
		{
			order = "";
			description = "";
			title = "";
		}
		
		public function setSummary( summary:ExamTypeSummary  ):void
		{
			this.code = summary.code;
			this.name = summary.name;
			this.title = summary.name;
		}	
		
		public function clone():ExamType
		{
			var copy:ExamType = new ExamType();
			copy.order = this.order;
			copy.code = this.code;
			copy.name = this.name;
			copy.description = this.description;
			copy.title = this.title;
			for each( var result:Result in this.results )
			{ 
				copy.results.addItem( result.clone() );
			}
			
			return copy;
		}	
		
	}
}